package top.zywork.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * GoodsGrouponDAO数据访问接口<br/>
 *
 * 创建于2019-07-24<br/>
 *
 * @author http://zywork.top 王振宇
 * @version 1.0
 */
@Mapper
public interface GoodsGrouponDAO extends BaseDAO {

    @Override
    List<Object> listAllByCondition(@Param("query") Object queryObj);

    @Override
    List<Object> listPageByCondition(@Param("query") Object queryObj);

    @Override
    Long countByCondition(@Param("query") Object queryObj);

    /**
     * 根据其他的关联主键更新表状态
     * @param shopId 店铺id
     * @param goodsId 商品id
     * @param goodsSkuId 商品sku的id
     * @param isActive 状态
     * @return
     */
    int updateActiveByOtherId(@Param("shopId") Long shopId, @Param("goodsId") Long goodsId, @Param("goodsSkuId") Long goodsSkuId, @Param("isActive") byte isActive);
}
